package com.shareppy.norman.sqlite.db;

import android.database.Cursor;

import com.shareppy.norman.core.db.CursorWrapper;

public class SQLiteCursor implements CursorWrapper<Cursor> {

	private Cursor cursor;

	public SQLiteCursor(Cursor cursor) {
		this.cursor = cursor;
	}

	@Override
	public int getInt(int index) {
		return cursor.getInt(index);
	}

	@Override
	public long getLong(int index) {
		return cursor.getLong(index);
	}

	@Override
	public float getFloat(int index) {
		return cursor.getFloat(index);
	}

	@Override
	public double getDouble(int index) {
		return cursor.getDouble(index);
	}

	@Override
	public String getString(int index) {
		return cursor.getString(index);
	}

	@Override
	public void moveToFirst() {
		cursor.moveToFirst();
	}

	@Override
	public void close() {
		if (!cursor.isClosed()) {
			cursor.close();
		}
	}

	@Override
	public void moveToNext() {
		cursor.moveToNext();
	}

	@Override
	public int getColumnCount() {
		return cursor.getColumnCount();
	}

	@Override
	public boolean isAfterLast() {
		return cursor.isAfterLast();
	}

	@Override
	public int getType(int index) {
		return cursor.getType(index);
	}

	@Override
	public String getColumnName(int index) {
		return cursor.getColumnName(index);
	}

	@Override
	public Cursor raw() {
		return cursor;
	}

	@Override
	public int getColumnIndex(String name) {
		return cursor.getColumnIndex(name);
	}
}